home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1997 July / EnigmA AMIGA RUN 20 (1997)(G.R. Edizioni)(IT)[!][issue 1997-07 & 08][EAR-CD IV].iso / lightwave / tips / lightwave-jan95.txt / 000337_owner-lightwave-l _Fri Jan 27 21:35:17 1995.msg < prev    next >
Internet Message Format  |  1995-02-04  |  3KB

  1. Return-Path: <owner-lightwave-l>
  2. Received: by mail3.netcom.com (8.6.9/Netcom)
  3.     id RAA25504; Fri, 27 Jan 1995 17:53:47 -0800
  4. Received: from mv.mv.com by mail3.netcom.com (8.6.9/Netcom)
  5.     id RAA25444; Fri, 27 Jan 1995 17:53:26 -0800
  6. Received: by mv.mv.com (8.6.9/mv(b)/mem-940616)
  7.     id UAA19026 for lightwave-l@netcom.com; Fri, 27 Jan 1995 20:49:24 -0500
  8. Received: by fusion.mv.com (V1.16/Amiga)
  9.     id AA0036h; Fri, 27 Jan 95 16:11:16 EST
  10. Date: Fri, 27 Jan 95 16:11:16 EST
  11. Message-Id: <9501272111.AA0036g@fusion.mv.com>
  12. Message-Id: <201cdc21.cb74a-mark@fusion.mv.com>
  13. In-Reply-To: <9501272119.aa20180@magna.com.au>
  14.          (from Brett Feeney <brettf@magna.com.au>)
  15.          (at Fri, 27 Jan 95 21:19:02 PST)
  16. X-Mailer: //\\miga Electronic Mail (AmiElm 4.159)
  17. From: mark@fusion.MV.COM (Mark Thompson)
  18. To: lightwave-l@netcom.com
  19. Subject: Re: alpha's
  20. Sender: owner-lightwave-l@netcom.com
  21. Precedence: bulk
  22.  
  23. Brett Feeney <brettf@magna.com.au> writes:
  24. > is there a way to produce an alpha channel for lensflare, 
  25. > could sumone explain the theory behind it to me .
  26. >     thanx in advance to any help recieved
  27.  
  28. You should really check out my article on the alpha channel in the
  29. July issue of LWPro. I covered this as well as many other issues.
  30.  
  31. Lens flares are an additive effect, ie. adding them to some image should
  32. not in any way diminish the intensity contribution of any pixel. The
  33. standard formula for combining two images using alpha is: PixNew = [PixFG *
  34. alpha] + [PixBG * (1 - alpha)] where alpha is scaled to a value from 0 to
  35. 1. As you can see, with a translucent object (say alpha=0.5), the
  36. background will be decreased in value by 50% to arrive at the new pixel
  37. value. Therefore, what you really want to do is render your lens flares
  38. over a black background, and then when you composite them, simply do an
  39. absolute add of flare to the background (or using the format of the
  40. equation above: PixNew = PixFG + PixBG). Once your flares are rendered over
  41. a black background, you simply load the image(s) into the forground in
  42. LW and composite them over your other graphics using a completely black
  43. image for alpha (or using the alpha that was generated by LW when the
  44. flares were rendered, which will be all black unless there were objects
  45. other than lights in the scene). The other option is to composite the
  46. flares externally in something like ImageFX. In this case, you would
  47. use the "absolute add" compositing mode for the flares.
  48.  
  49. For more details, see the LWPro article.
  50.      *~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~*
  51.      *           Mark Thompson               (603) 424-1829       *
  52.      *         Fusion Films Inc.           mark@fusion.mv.com     *
  53.      *     Radiant Image Productions                              *
  54.       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~